# using * to extend list or string
l = [1, 2, 3]
print(l * 5)
s = 'abc'
print(s * 5)
# building lists of lists
board1 = [[' '] * 3 for i in range(3)]  # 每次board进行append时产生新的列表
board2 = [[' '] * 3] * 3                # 同样的列表被append3次
board1[1][2] = 'X'
board2[1][2] = 'Y'
print(board1)
print(board2)